class Company < ActiveRecord::Base
  set_table_name :user_companies

  belongs_to :user_info, :touch => true

  validates :ico, :format => {:with => Format::ICO_REGEX}, :length => {:maximum => 13}, :presence => true
  validates :dic, :length => {:maximum => 13}, :allow_blank => true
  validates :name, :presence => true, :length => {:maximum => 30}
  validates :phone, :format => {:with => Format::PHONE_REGEX}, :length => {:maximum => 16}, :allow_blank => true
end
